package com.sgb.kjwl.viewmodel.home;

import com.sgb.kjwl.repository.HomeRepertory;
import com.sgb.kjwl.view.ui.activity.home.SearchActivity4;
import com.swgk.core.base.BaseViewModel;

public class SearchModel4 extends BaseViewModel {
    private SearchActivity4 activity;
    private HomeRepertory repertory;
    private static final String TAG = "SearchModel4";

    public SearchModel4(SearchActivity4 activity, HomeRepertory repertory) {
        this.activity = activity;
        this.repertory = repertory;
    }

    public void searchCategory() {
//        APIManager.getInstance().getCommonAPI().searchCategoryItems().enqueue(new Callback<BaseEntity<List<CategoryItem>>>() {
//            @Override
//            public void onResponse(Call<BaseEntity<List<CategoryItem>>> call, Response<BaseEntity<List<CategoryItem>>> response) {
//                DialogHelper.dismissProgressDialog();
//                if (response.body() == null) {
//                    activity.showTab(null);
//                    return;
//                }
//                if (response.body().getState().equals(APIManager.RESPONSE_OK)) {
//                    activity.showTab(response.body().getData());
//                } else {
//                    MToast.showToast(activity, response.message());
//                }
//            }
//
//            @Override
//            public void onFailure(Call<BaseEntity<List<CategoryItem>>> call, Throwable t) {
//                DialogHelper.dismissProgressDialog();
//                MLog.d(AppConstant.API_LOG, "error " + t.getMessage());
//            }
//        });

    }


}
